home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94a.txt / 000029_icon-group-sender _Fri Jan 28 20:38:01 1994.msg < prev    next >
Internet Message Format  |  1994-08-19  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Sun, 30 Jan 1994 20:20:50 MST
  2. Date: 28 Jan 94 20:38:01 GMT
  3. From: agate!dog.ee.lbl.gov!overload.lbl.gov!lll-winken.llnl.gov!uop!not-for-mail@ucbvax.Berkeley.EDU  (William Clark)
  4. Organization: University of the Pacific
  5. Subject: Table look up questions?
  6. Message-Id: <2ibt39$ojg@uop.cs.uop.edu>
  7. Sender: icon-group-request@cs.arizona.edu
  8. To: icon-group@cs.arizona.edu
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12.  
  13.    I am working on a project which needs to use a table (or some other 
  14.    date structure.  I'm open for suggestions) for a look-up and translate 
  15.    function.  The key will be a scrambled string of various characters
  16.    and the other half (if possible) will be the translated or matching
  17.    string.
  18.    
  19.    Example:  User inputs:  H W <enter>
  20.          Output: Hello World
  21.    
  22.    Where "H W" is a key in the table and "Hello World" is the other
  23.    half.
  24.    
  25.    My questions are:  Is there an algorithm already out there which
  26.    I can use to solve this problem?  Or can someone write some brief
  27.    code which implements loading a table and looking the data up?  Also,
  28.    If someone could explain "Tags" in the table.  Are these used to
  29.    restrict look up areas?  (i.e. if the above example had a tag of "H"
  30.    on the key, would this restrict the look up area to the H's only?)
  31.  
  32.    I should have mentioned, I am new to the ICON programming language and
  33.    have placed an order for _The_Icon_Programming_Language_, 2nd ed.
  34.  
  35.    Thanks.
  36.  
  37.    William R. Clark
  38.    University of the Pacific
  39.    wclark@thor.cs.uop.edu
  40.